<template>
  <section id="iright" class="rfloat">
    <div class="Ritem">
        <h3>阅读排行榜</h3>
        <ul class="RitemUl">
            <li v-for="(item,index) in rdInfoList" :key="item.index"><a :href="'/content/' + item.id">{{item.title}}</a></li>
        </ul>
    </div>
    <div class="Ritem">
        <h3>推荐排行榜</h3>
        <ul class="RitemUl">
            <li v-for="(item,index) in tjInfoList" :key="item.index"><a :href="'/content/' + item.id">{{item.title}}</a></li>
        </ul>
    </div>
  </section>
</template>

<script>
export default {
  name: 'hot',
  data () {
    return {
      rdInfoList:[],
      tjInfoList:[]
    }
  },
  mounted(){
    this.rdList();
    this.tjList();
  },
  methods:{
    rdList:function(){
      this.$http.get('http://www.eblog.site/eblog/readTop',
      {emulateJSON: true})
      .then(function(response){
        this.rdInfoList=response.body.pageInfo.list;
      },function(response){

      })
    },
    tjList:function(){
      this.$http.get('http://www.eblog.site/eblog/tuijianTop',
      {emulateJSON: true})
      .then(function(response){
        this.tjInfoList=response.body.pageInfo.list;
      },function(response){

      })
    },
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>

</style>
